import java.util.ArrayList;

/**
 * ZhangChang
 */
public class Util {

    public static String format_(String name) {
        ArrayList<String> strs = new ArrayList<String>();
        int lastIndex = 0;
        for (int i = 0; i < name.length(); i++) {
            if (name.charAt(i) >= 'A' && name.charAt(i) <= 'Z') {
                String str = name.substring(lastIndex, i);
                strs.add(str);
                lastIndex = i;
            }
            if (i == name.length() - 1) {
                String str = name.substring(lastIndex);
                strs.add(str);
            }
        }
        return String.join("_", strs);
    }
}
